package com.yjd.bi.user.service;

import java.util.List;
import java.util.Map;

import com.yjd.bi.user.dto.UserBaseInfoDto;
import com.yjd.bi.user.dto.UserRankDto;
import com.yjd.bi.user.dto.UserRemainDto;
import com.yjd.bi.user.dto.UserTicketUsedDto;
import com.yjd.bi.user.model.UserModel;
import com.yjd.bi.user.model.UserStatisticInfoModel;
import com.yjd.comm.base.service.IBaseService;

/**
 * <b>description</b>：微信分享红包业务接口<br>
 * <b>time</b>：2016-12-14 16:43:52 <br>
 * <b>author</b>：  ready likun_557@163.com
 */
public interface IUserService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public UserModel insert(UserModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(UserModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public int delete(long user_id) throws Exception;
	
	/**
	 * 获取排名用户
	 * @param type
	 * @param paramMap
	 * @return
	 */
	public List<UserRankDto> getRankUsers(int type,Map<String, Object> paramMap)throws Exception;

	/**
	 * 查询渠道用户统计情况
	 * @param paramMap
	 * @return
	 */
	public List<UserStatisticInfoModel> queryChannelUserStatics(Map<String, Object> paramMap)throws Exception;

	/**
	 * 根据user_id查询用户相关信息
	 *
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public UserBaseInfoDto queryUserInfoById(Long user_id) throws Exception;

	/**
	 * 根据user_id查询用户留存信息
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public UserRemainDto queryUserRemainInfoById(Long user_id) throws Exception;

	/**
	 * 根据user_id查询用户最近使用的投资券
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public UserTicketUsedDto queryUserTicketsUsedRecentlyById(Long user_id) throws Exception;
}
